<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app">
    <!-- 因为input中的v-model绑定了message，所以会实时将输入的内容传递给message，message发生改变，通过我们的插值语法展示到我们的界面中 -->
    <input type="text" v-model="message">
    <h2>v-model：{{message}}</h2>

    <button @click="btnClick">按钮</button>
  </div>
  <script src="../js/vue.js"></script>
  <script>
    const app = new Vue({
      el: '#app',
      data: {
        message: ''
      },
      methods: {
        btnClick(){
          console.log(this.message);
        }
      },
  })
  </script>
</body>
</html>